<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/9/29
 * Time: 18:52
 */

namespace app\jiajiao\model;

use think\Model;
class TeacherModel extends Model
{
    /**
     * @param $images
     * 将图片转成数组
     */
    protected function getImagesAttr($images){
          if(empty($images)){
              return $images;
          }else{
              return json_decode(stripslashes($images));
          }
    }

    /**
     * @param $zhengshu
     * @return mixed
     * 将图片转成数组
     */
    protected function getZhengshuAttr($zhengshu){
         if(empty($zhengshu)){
             return $zhengshu;
         }else{
            return json_decode(stripcslashes($zhengshu));
         }
   }
}